package com.gali.mall.request.orderItemReq;

import javax.validation.constraints.Max;
import javax.validation.constraints.NotNull;

/**
 * @author gali
 * @date 2022/4/25 21:36
 */
public class AddOrderItemReq {
    @NotNull(message = "归属订单不能为空")
    private Integer orderNo;
    @NotNull(message = "商品id不能为空")
    private Integer productId;
    @NotNull(message = "商品名称不能为空")
    private String productName;
    @NotNull(message = "商品图片不能为空")
    private String productImg;
    @NotNull(message = "商品价格不能为空")
    private Integer unitPrice;
    @NotNull(message = "数量不能为空")
    @Max(value = 1000,message = "数量最大为1000")
    private Integer quantity;

    private Integer totalPrice;

    public Integer getProductId() {
        return productId;
    }

    public void setProductId(Integer productId) {
        this.productId = productId;
    }

    public String getProductName() {
        return productName;
    }

    public Integer getOrderNo() {
        return orderNo;
    }

    public void setOrderNo(Integer orderNo) {
        this.orderNo = orderNo;
    }

    public void setProductName(String productName) {
        this.productName = productName;
    }

    public String getProductImg() {
        return productImg;
    }

    public void setProductImg(String productImg) {
        this.productImg = productImg;
    }

    public Integer getUnitPrice() {
        return unitPrice;
    }

    public void setUnitPrice(Integer unitPrice) {
        this.unitPrice = unitPrice;
    }

    public Integer getQuantity() {
        return quantity;
    }

    public void setQuantity(Integer quantity) {
        this.quantity = quantity;
    }

    public Integer getTotalPrice() {
        return totalPrice;
    }

    public void setTotalPrice(Integer totalPrice) {
        this.totalPrice = totalPrice;
    }
}
